// 引入axios
import request from '@/utils/request'

// 获取组织架构
export const reqGetDepartments = () => request.get('/company/department')

// 根据id 删除部门
export const reqDelDepartments = id => request.delete(`/company/department/${id}`)

// 新增部门
export const reqAddDepartments = data => request.post('/company/department', data)

// 根据id 获取部门详情
export const reqGetDepartDetail = id => request.get(`/company/department/${id}`)

// 根据id 修改部门详情
export const reqUpdateDepartments = data => request.put(`/company/department/${data.id}`, data)
